# monitor test
use Monitor ('monitor', 'unmonitor');

$x = 10;
@a = (100, 200, 300);
%h = (a => 1, b => 2, c => 3 );

monitor( \$x, 'x' );
monitor( \@a, 'a' );
monitor( \%h, 'h' );

$x = 20;
$y1 = $x;
print "y1 = $y1\n";

$a[2] = 3000;
$y2 = $a[2];
print "y2 = $y2\n";

$h{'c'} = 30;
$y3 = $h{'c'};
print "y3 = $y3\n";

unmonitor( \$x );
unmonitor( \@a );
unmonitor( \%h );

print "x = $x\n";
print "a = @a\n";
print "h = ", %h, "\n";


# end of file

